package org.springblade.modules.admin.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springblade.common.cache.DictCache;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springblade.core.tool.utils.Func;

/**
 * blade_building_plan_weekly_report_config
 * @author
 */
@Data
@TableName("blade_building_plan_weekly_report_config")
public class BuildingPlanWeeklyReportConfig extends TenantEntity {

    /**
     * 项目id
     */
    private Long buildingId;

    /**
     * 周期 1-周一
     */
    private Integer sendDateType;

    /**
     * 推送方式 1-周报
     */
    private Integer sendReportType;

	/**
	 * 推送时间
	 */
	private String sendTime;

    /**
     * 维修配置
     */
    private String malConfig;

    /**
     * 救援配置
     */
    private String rescueConfig;

	@TableField(exist = false)
	private String buildingName;

	@TableField(exist = false)
	private String buildingType;

	@TableField(exist = false)
	private String buildingTypeName;

	@TableField(exist = false)
	private String startTime;

	@TableField(exist = false)
	private String endTime;

	@TableField(exist = false)
	private Long elevatorCount;

	public void setBuildingType(String buildingType) {
		this.buildingType = buildingType;
		if(Func.isNotEmpty(buildingType)){
			this.buildingTypeName = DictCache.getValue("building_type",buildingType);
		}
	}
}
